'use strict';

/**
 * @ngdoc overview
 * @name newWfApp
 * @description
 * # newWfApp
 *
 * Main module of the application.
 */
angular
        .module('newWfApp', [
            'ngAnimate',
            'ngCookies',
            'ngResource',
            'ngRoute',
            'ngSanitize',
            'ngTouch'
        ])
        .config(function ($routeProvider) {
            $routeProvider
                    .when('/', {
                        templateUrl: 'views/main.html',
                        controller: 'MainCtrl'
                    })
                    .when('/about', {
                        templateUrl: 'views/about.html',
                        controller: 'AboutCtrl'
                    })
                    .when('/packages', {
                        templateUrl: 'views/package/packageList.html',
                        controller: 'PackageListController'
                    })
                    .when('/packages/:packageId', {
                        templateUrl: 'views/package/packageDetail.html',
                        controller: 'PackageDetailController'
                    })
                    .when('/tasks/', {
                        templateUrl: 'views/task/taskList.html',
                        controller: 'TaskListController'
                    })
                    .when('/tasks/:taskId', {
                        templateUrl: 'views/task/taskDetail.html',
                        controller: 'TaskDetailController'
                    })
                    .when('/human/tasks', {
                        templateUrl: 'views/task/human/taskList.html',
                        controller: 'HumanTaskListController'
                    })
                    .when('/human/tasks/:taskId', {
                        templateUrl: 'views/task/human/taskDetail.html',
                        controller: 'HumanTaskDetailController'
                    })
                    .otherwise({
                        redirectTo: '/'
                    });
        });
